<link rel="stylesheet" href="<?php echo URL::base() . 'media/js/jquery/css/timepicker.css' ?>" type="text/css" />
<script type="text/javascript" src="<?php echo URL::base() . 'media/js/ckeditor/ckeditor.js' ?>"></script>
<script type="text/javascript" src="<?php echo URL::base() . 'media/js/jquery/js/jquery.ui.datepicker-hu.js' ?>"></script>
<script type="text/javascript" src="<?php echo URL::base() . 'media/js/jquery/js/jquery-ui-timepicker-addon.js' ?>"></script>
<script type="text/javascript">
    var alerts='<?php if(isset($e))echo ($e->getmessage()) ?>';
    if(alerts!='') alert(alerts);
</script>
<form method="post" action="<?php echo $action ?>">
    <label for="name">Találkozó neve:</label>
    <input type="textfield" name="name" id="name"
           <?php if (isset($meetings)) echo('value="' . $meetings->name . '"'); ?> />
    <br/>
    <label for="date">Találkozó ideje:</label>
    <input type="textfield" name="date" id="date"
           <?php if (isset($meetings)) echo('value="' . $meetings->date . '"'); ?> />
    <br/>
    <label for="sub_date">Jelentkezési határidő:</label>
    <input type="textfield" name="sub_date" id="sub_date"
           <?php if (isset($meetings)) echo('value="' . $meetings->sub_date . '"'); ?> />
    <br/>
    <label for="description">Leírás:</label>
    <?php echo $ckeditor->editor("description", @$meetings->description, $config) ?><br />
    <label for="wiki_slug">Wiki kategória (<i>pl.: 2012_tavasz</i>): </label>
    <?php if (!isset($meetings->wiki_slug)) : ?>
        <input type="textfield" name="wiki_slug"/>
        <br />
        <font color="red">Figyelem! A találkozó létrehozása után a Wiki kategória már nem lesz módosítható!</font>
    <?php else : ?>
        <b><?php echo $meetings->wiki_slug ?></b>
    <?php endif ?>
    <br/>
    <input type="submit" value="Mentés" />
</form>
<script type="text/javascript">
    $.datepicker.setDefaults( $.datepicker.regional[ "hu" ] );
    $('#date').datetimepicker({
        timeFormat: 'hh:mm',
        showOn: 'button', 
        buttonImage: '<?php echo URL::base() . "media/js/jquery/images/icon_cal.png" ?>'
    });
    $('#sub_date').datetimepicker({
        timeFormat: 'hh:mm',
        showOn: 'button', 
        buttonImage: '<?php echo URL::base() . "media/js/jquery/images/icon_cal.png" ?>'
    });
</script>
<a href="<?php echo Url::site('admin/tasks', TRUE, FALSE) ?>">Vissza</a>